<!doctype html>
<html class="no-js" lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title> RUN管理系统 </title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="apple-touch-icon" href="../apple-touch-icon.png">
    <!-- Place favicon.ico in the root directory -->
    <link rel="stylesheet" href="../css/vendor.css">
    <link href="../css/style.css" rel="stylesheet">
    <script src="../js/jquery-3.3.1.js"></script>
    <script src="../js/jquery.paginate.js"></script>
    <!-- Theme initialization -->
    <script>
        var themeSettings = (localStorage.getItem('themeSettings')) ? JSON.parse(localStorage.getItem('themeSettings')) :
            {};
        var themeName = themeSettings.themeName || '';
        if (themeName)
        {
            document.write('<link rel="stylesheet" id="theme-style" href="../css/app-' + themeName + '.css">');
        }
        else
        {
            document.write('<link rel="stylesheet" id="theme-style" href="../css/app.css">');
        }
    </script>
</head>
<body>
<div class="main-wrapper">
    <div class="app" id="app">
        <header class="header">
            <div class="header-block header-block-collapse d-lg-none d-xl-none">
                <button class="collapse-btn" id="sidebar-collapse-btn">
                    <i class="fa fa-bars"></i>
                </button>
            </div>
            <div class="header-block header-block-nav">
                <ul class="nav-profile">

                    <li class="profile dropdown">
                        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">

                            <span class="name" th:text="${bumngUser.name}"> ${bumngUser.name} </span>
                        </a>
                        <div class="dropdown-menu profile-dropdown-menu" aria-labelledby="dropdownMenu1">

                            <a class="dropdown-item" href="../user/loginOut.htm">
                                <i class="fa fa-power-off icon"></i> Logout </a>
                        </div>
                    </li>
                </ul>
            </div>
        </header>
        <aside class="sidebar">
            <div class="sidebar-container">
                <div class="sidebar-header">
                    <div class="brand">
                        <div class="logo">
                            <span class="l l1"></span>
                            <span class="l l2"></span>
                            <span class="l l3"></span>
                            <span class="l l4"></span>
                            <span class="l l5"></span>
                        </div> RUN管理系统 </div>
                </div>
                <nav class="menu">
                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/index.htm">
                                <i class="fa fa-home"></i> 用户列表 </a>
                        </li>
                    </ul>
                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/userAddress.htm">
                                <i class="fa fa-home"></i> 用户收货地址列表 </a>
                        </li>
                    </ul>

                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li class="active">
                            <a href="../bumng/pointList.htm">
                                <i class="fa fa-home"></i> 用户积分列表 </a>
                        </li>
                    </ul>

                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/userTrade.htm">
                                <i class="fa fa-home"></i> 用户交易记录列表 </a>
                        </li>
                    </ul>

                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li>
                            <a href="../bumng/pocketLog.htm">
                                <i class="fa fa-home"></i> 口袋日志表 </a>
                        </li>
                    </ul>
                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/pocketList.htm">
                                <i class="fa fa-home"></i> 口袋列表 </a>
                        </li>
                    </ul>
                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li>
                            <a href="../bumng/pocketTransList.htm">
                                <i class="fa fa-home"></i> 口袋转账列表 </a>
                        </li>
                    </ul>
                    <ul class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/news.htm">
                                <i class="fa fa-home"></i> 新闻banner列表 </a>
                        </li>
                    </ul>
                    <ul  class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/productList.htm">
                                <i class="fa fa-home"></i> 商品列表 </a>
                        </li>
                    </ul>
                    <ul class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/taskList.htm">
                                <i class="fa fa-home"></i> 任务列表 </a>
                        </li>
                    </ul>
                    <ul class="sidebar-menu metismenu" id="sidebar-menu">
                        <li >
                            <a href="../bumng/area.htm">
                                <i class="fa fa-home"></i> 任务区域价格列表 </a>
                        </li>
                    </ul>
                    <ul class="sidebar-menu metismenu" id="sidebar-menu">
                        <li  >
                            <a href="../bumng/shcDetail.htm">
                                <i class="fa fa-home"></i> 挖矿详情 </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <footer class="sidebar-footer">
                <ul class="sidebar-menu metismenu" id="customize-menu">
                    <li>
                        <ul>
                            <li class="customize">
                                <div class="customize-item">
                                    <div class="row customize-header">
                                        <div class="col-4"> </div>
                                        <div class="col-4">
                                            <label class="title">fixed</label>
                                        </div>
                                        <div class="col-4">
                                            <label class="title">static</label>
                                        </div>
                                    </div>
                                    <div class= "row">
                                        <div class="col-4">
                                            <label class="title">Sidebar:</label>
                                        </div>
                                        <div class="col-4">
                                            <label>
                                                <input class="radio" type="radio" name="sidebarPosition" value="sidebar-fixed">
                                                <span></span>
                                            </label>
                                        </div>
                                        <div class="col-4">
                                            <label>
                                                <input class="radio" type="radio" name="sidebarPosition" value="">
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-4">
                                            <label class="title">Header:</label>
                                        </div>
                                        <div class="col-4">
                                            <label>
                                                <input class="radio" type="radio" name="headerPosition" value="header-fixed">
                                                <span></span>
                                            </label>
                                        </div>
                                        <div class="col-4">
                                            <label>
                                                <input class="radio" type="radio" name="headerPosition" value="">
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-4">
                                            <label class="title">Footer:</label>
                                        </div>
                                        <div class="col-4">
                                            <label>
                                                <input class="radio" type="radio" name="footerPosition" value="footer-fixed">
                                                <span></span>
                                            </label>
                                        </div>
                                        <div class="col-4">
                                            <label>
                                                <input class="radio" type="radio" name="footerPosition" value="">
                                                <span></span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="customize-item">
                                    <ul class="customize-colors">
                                        <li>
                                            <span class="color-item color-red" data-theme="red"></span>
                                        </li>
                                        <li>
                                            <span class="color-item color-orange" data-theme="orange"></span>
                                        </li>
                                        <li>
                                            <span class="color-item color-green active" data-theme=""></span>
                                        </li>
                                        <li>
                                            <span class="color-item color-seagreen" data-theme="seagreen"></span>
                                        </li>
                                        <li>
                                            <span class="color-item color-blue" data-theme="blue"></span>
                                        </li>
                                        <li>
                                            <span class="color-item color-purple" data-theme="purple"></span>
                                        </li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                        <a href="">
                            <i class="fa fa-cog"></i> Customize </a>
                    </li>
                </ul>
            </footer>
        </aside>
        <div class="sidebar-overlay" id="sidebar-overlay"></div>
        <div class="sidebar-mobile-menu-handle" id="sidebar-mobile-menu-handle"></div>
        <div class="mobile-menu-handle"></div>
        <article class="content dashboard-page">
            <div class="col-md-12">
                <form id="form" action="..//bumng/pointList.htm" method="get">
                    <div class="form-group"  style="float:left;margin-right:20px">
                        <label class="control-label">用户名</label>
                        <input id="pageNum" name="pageNum" hidden = "hidden" type="text" style="width:200px" th:value="${pageNum}" class="form-control underlined"> </div>
                        <input name="userName" type="text" style="width:200px" th:value="${userName}" class="form-control underlined"> </div>
                    <div class="form-group"  style="float:left;margin-right:20px">
                        <label class="control-label">手机号</label>
                        <input name="phone" type="text" style="width:200px" th:value="${phone}" class="form-control underlined"> </div>
                    <div class="form-group" style="float:left;margin-right:20px">
                        <label class="control-label">积分排序</label>
                        <select name="typeSelect" id="typeSelect" >
                            <option th:if="${typeSelect} == 0" th:value="${typeSelect}"  selected = "selected">从大到小</option>
                            <option th:if="${typeSelect} == 1" th:value="${typeSelect}"  selected = "selected">从小到大</option>
                            <option th:if="${typeSelect} == null" th:value="${typeSelect}"  selected = "selected">默认</option>
                            <option th:if="${typeSelect} == 2" th:value="${typeSelect}"  selected = "selected">默认</option>
                            <option value="0">从大到小</option>
                            <option value="1">从小到大</option>
                            <option value="2">默认</option>
                        </select> </div>
                    <div class="form-group" style="float:left;margin-right:20px" >
                        <label class="control-label">每日发放积分</label>
                        <input name="point" id="point" type="text" style="width:200px" th:value="${pool.currency}" class="form-control underlined"> </div>
                    <div class="form-group" style="float:left;margin-right:20px">
                        <label class="control-label">是否冻结</label>
                        <select name="type" id="type" >
                            <option th:if="${pool.type} == 0" th:value="${pool.type}"  selected = "selected">不冻结</option>
                            <option th:if="${pool.type} == 1" th:value="${pool.type}"  selected = "selected">冻结</option>
                            <option value="0">不冻结</option>
                            <option value="1">冻结</option>
                        </select> </div>
                    <div class="form-group" >
                        <label class="control-label">冻结时间</label>
                        <input name="froceTime" id="froceTime" type="text" th:value="${#dates.format(pool.timeFrozen,'yyyy-MM-dd HH:mm:ss')}" class="form-control underlined"> </div>
                      <button type="button" class="btn btn-primary-outline" onclick="updatePoint()">修改</button>
                    <button type="submit" class="btn btn-primary-outline">搜索</button>
                </form>
                <div class="card">
                    <div class="card-block">
                        <div class="card-title-block">
                            <h3 class="title"> 用户积分列表 </h3>
                        </div>
                        <section class="example">
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>id</th>
                                    <th>用户名</th>
                                    <th>手机号</th>
                                    <th>积分</th>
                                    <th>冻结积分</th>
                                    <th>已消费积分</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="userPoint: ${userPointModels}">
                                    <th th:text="${userPoint.id}" >1</th>
                                    <td th:text="${userPoint.userName}">111</td>
                                    <td th:text="${userPoint.phone}">111</td>
                                    <td th:text="${userPoint.point}">11</td>
                                    <td th:text="${userPoint.pointFrozen}">11</td>
                                    <td th:text="${userPoint.pointConsuming}">11</td>
                                    <td>
                                        <button type="button" class="btn btn-primary-outline" th:onclick="'javascript:edit(\''+${userPoint.userId}+'\');'">赠送</button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <div id="demo1" >
                            </div>
                        </section>
                    </div>
                </div>
            </div>
        </article>

        <div class="modal fade" id="modal-media">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">Media Library</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                            <span class="sr-only">Close</span>
                        </button>
                    </div>
                    <div class="modal-body modal-tab-container">
                        <ul class="nav nav-tabs modal-tabs" role="tablist">
                            <li class="nav-item">
                                <a class="nav-link" href="#gallery" data-toggle="tab" role="tab">Gallery</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link active" href="#upload" data-toggle="tab" role="tab">Upload</a>
                            </li>
                        </ul>
                        <div class="tab-content modal-tab-content">
                            <div class="tab-pane fade" id="gallery" role="tabpanel">
                                <div class="images-container">
                                    <div class="row"> </div>
                                </div>
                            </div>
                            <div class="tab-pane fade active in" id="upload" role="tabpanel">
                                <div class="upload-container">
                                    <div id="dropzone">
                                        <form action="/" method="POST" enctype="multipart/form-data" class="dropzone needsclick dz-clickable" id="demo-upload">
                                            <div class="dz-message-block">
                                                <div class="dz-message needsclick"> Drop files here or click to upload. </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary">Insert Selected</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
        <div class="modal fade" id="confirm-modal">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title">
                            <i class="fa fa-warning"></i> Alert</h4>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <p>Are you sure want to do this?</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" data-dismiss="modal">Yes</button>
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
    </div>
</div>
<!-- Reference block for JS -->
<div class="ref" id="ref">
    <div class="color-primary"></div>
    <div class="chart">
        <div class="color-primary"></div>
        <div class="color-secondary"></div>
    </div>
</div>
<script src="../js/laydate/laydate.js"></script>
<script th:inline="javascript">
    (function(i, s, o, g, r, a, m)
    {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function()
            {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
        a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
    ga('create', 'UA-80463319-4', 'auto');
    ga('send', 'pageview');

    function dj(roomId){
        var iTop = (window.screen.height-30-700)/2; //获得窗口的垂直位置;
        var iLeft = (window.screen.width-10-600)/2; //获得窗口的水平位置;
        window.open('../room/signRoom.htm?roomId='+roomId, '_blank', 'height=700, width=600, top='+iTop+', left='+iLeft+', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
    }

    function updatePoint(){

        var point  = document.getElementById("point").value;
        var type  = document.getElementById("type").value;
        var froceTime  = document.getElementById("froceTime").value;

        jQuery.ajax({
            dataType:'json',
            type:'post',
            async:false,
            url:"../bumng/updatePoint.do",
            data:{
                "point":point,
                "type":type,
                "froceTime":froceTime
            },
            success:function(data){

                if(data.bizSucc){
                   window.location.reload();
                }else{
                    alert(data.msg);
                }


            },

            error : function(data) {
                alert(data);
            }
        });
    }


    //时间选择器
    laydate.render({
        elem: '#froceTime'
        ,type: 'datetime'
    });

    function edit(userId){
        var iTop = (window.screen.height-30-700)/2; //获得窗口的垂直位置;
        var iLeft = (window.screen.width-10-600)/2; //获得窗口的水平位置;
        window.open('../bumng/editPoint.htm?userId='+userId, '_blank', 'height=700, width=600, top='+iTop+', left='+iLeft+', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
    }

    //分页
    $("#demo1").paginate({
        count 		: [[${pageTotal}]],

        start 		: [[${pageNum}]],

        display     : 10,

        border					: true,

        border_color			: '#BEF8B8',

        text_color  			: '#68BA64',

        background_color    	: '#E3F2E1',

        border_hover_color		: '#68BA64',

        text_hover_color  		: 'black',

        background_hover_color	: '#CAE6C6',

        rotate      : false,

        images		: false,

        mouse		: 'press',
        onChange: function(page) {
            var form = document.getElementById('form');
            document.getElementById("pageNum").value=page;
            form.submit();
        }
    });
</script>
<script src="../js/vendor.js"></script>
<script src="../js/app.js"></script>
</body>
</html>